﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleIR
{
	[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes")]
	public abstract class IRCompareableName : IComparable<IRCompareableName>
	{
		private readonly int m_refid;

		public int RefID { get { return this.m_refid; } }

		protected IRCompareableName()
		{ this.m_refid = IRProgram.GlobalRefCtrGen.GenNextVal(); }

		public int CompareTo(IRCompareableName other)
		{ return this.m_refid - other.m_refid; }
	}
}
